package ink.onei.client.controller;

import ink.onei.common.core.controller.BaseController;
import ink.onei.common.core.page.TableDataInfo;
import ink.onei.shopping.domain.Goods;
import ink.onei.shopping.service.IGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: nekotako
 * @Description: TODO
 * @Date: 02/03/2024 09:21 Saturday
 */
@RestController
@RequestMapping("/")
public class ForestageController extends BaseController {

    @Autowired
    private IGoodsService goodsService;
    /**
     * 前台查询商品列表
     */
    @RequestMapping("/getGoodsList")
    public TableDataInfo getGoodsList(Goods goods) {
        startPage();
        List<Goods> list = goodsService.selectGoodsList(goods);
        return getDataTable(list);
    }
}
